package keye.document_manage.service.impl;

import java.util.List;

import javax.annotation.Resource;

import keye.document_manage.dao.sqlserver.IClassEntityRelationDao;
import keye.document_manage.domain.ClassEntityRelation;
import keye.document_manage.domain.ClassEntityRelationWithArchive;
import keye.document_manage.service.IClassEntityRelationService;

import org.springframework.stereotype.Service;


@Service("classEntityService")
public class ClassEntityRelationServiceImpl implements IClassEntityRelationService {

	@Resource
	private IClassEntityRelationDao classEntityRelationDao;
	
	public ClassEntityRelation getClassEntityRelation(String id) {
		return classEntityRelationDao.selectByPrimaryKey(id);
	}

	public List<ClassEntityRelation> getAllClassEntityRelation() {
		
		return classEntityRelationDao.getAllClassEntityRelations();
	}

	public List<ClassEntityRelation> getTreeRoot() {
		return classEntityRelationDao.getTreeRoot();
	}

	public List<ClassEntityRelation> getTreeNode(String pid) {
		return classEntityRelationDao.getTreeNode(pid);
	}
	
	public IClassEntityRelationDao getClassEntityRelationDao() {
		return classEntityRelationDao;
	}

	public void setClassEntityRelationDao(IClassEntityRelationDao classEntityRelationDao) {
		this.classEntityRelationDao = classEntityRelationDao;
	}

	@Override
	public List<ClassEntityRelationWithArchive> getTreeNode2(String pid) {
		return null;
	}

}
